CREATE TABLE [dbo].[ReaderCard]
(
[Id] [int] NOT NULL,
[CardNumber] [nchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ReaderId] [int] NULL,
[VaildDate] [date] NULL,
[EndDate] [date] NULL,
[Status] [int] NULL,
[CardType] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ReaderCard] ADD CONSTRAINT [PK_ReaderCard] PRIMARY KEY CLUSTERED  ([Id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ReaderCard] ADD CONSTRAINT [FK_ReaderCard_Reader] FOREIGN KEY ([ReaderId]) REFERENCES [dbo].[Reader] ([Id])
GO
